package com.xiyang.firstfeign.controller;

import com.xiyang.firstfeign.clients.FirstFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xiyang.ycj
 * @since May 31, 2019 10:21:15 AM
 */
@RestController
@RequestMapping("/FirstFeign")
public class FirstFeignController {

   // @Qualifier("firstFeignClient")
    @Autowired
    private FirstFeignClient firstFeignClient;

    @RequestMapping(value = "/hi",method = RequestMethod.GET)
    public  String sayHello(@RequestParam String name){
        return firstFeignClient.sayHello(name);
    }
}
